package com.example.lenovo.listview_lxy.adapter;

import android.content.Context;
import android.widget.ImageView;
import android.widget.TextView;

import com.example.lenovo.listview_lxy.R;
import com.example.lenovo.listview_lxy.bean.RefreshData;

import java.util.List;

/**
 * Created by lenovo on 2017/11/10.
 */

public class mainAdapter extends Lv_SimpleAdapter<RefreshData> {
    /**
     * 构造函数
     *
     * @param context 上下文
     * @param datas   数据源
     */
    public mainAdapter(Context context, List<RefreshData> datas) {
        super(context, R.layout.item_customer, datas);
    }

    @Override
    protected void convert(Lv_BaseViewHolder viewHoder, RefreshData item) {
        ImageView miv_portrait = viewHoder.getImageView(R.id.iv_portrait);
        TextView mtv_nickname = viewHoder.getTextView(R.id.tv_nickname);
        ImageView miv_myadd = viewHoder.getImageView(R.id.iv_myadd);
        mtv_nickname.setText(item.getNick_name());
    }

}
